import Vue from 'vue'
import Vuex from 'vuex'
import coupon from './coupon'
import qianggou from './qianggou'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    nameY: '杨青青',
    nameL: '梁金俊',
    nameW: '王煜'
  },
  getters: {
    getNameY(state) {
      return '我是处理后的' + state.nameY
    }
  },
  mutations: {
    setNameY(state, newNameY) {
      state.nameY = newNameY
    }
  },
  actions: {
    setActionSetNameY(context) {
      context.commit('setNameY', 'aafasdfasd')
    }
  },
  modules: {
    coupon,
    qianggou
  }
})